<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p3_浮动布局</title>
    <style>
        .fu{
            background-color: #00fff0;
            width: 500px;
            /*子元素都浮动走,父元素会失高
            可以给父元素设置BFC结界,此时父元素会根据子元素浮动后的实际高度自动填充高度*/
            overflow: hidden;
        }
        .fu>div{
            width: 100px;
            height: 100px;
            border: 5px solid #000;
        }
        .z1{
            background-color: #0000FF;
            float: right;/*右浮动*/
            /*float: left;*/
        }
        .z2{
            background-color: #FF0000;
            float: right;
            /*float: left;*/
        }
        .z3{
            background-color: #00FF00;
            float: right;
            /*float: left*/
        }
    </style>
</head>
<body>
<div class="fu">
    <div class="z1">111</div>
    <div class="z2">222</div>
    <div class="z3">333</div>
</div>

</body>
</html>